<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h">
      <form action="{:U('index')}" method="get" class="fr form-inline">
      
      
      <select name="status" id="status" class="form-control">
          <option value="">订单状态</option>
         
            <option <eq name="status" value="2">selected="selected"</eq> value="2">已付款</option>
            <option <eq name="status" value="1">selected="selected"</eq> value="1">未付款</option>
            <option <eq name="status" value="0">selected="selected"</eq> value="0">已取消</option>
            <option <eq name="status" value="6">selected="selected"</eq> value="6">退款中</option>
        </select>
      下单时间：<input class="form-control" type="text" onclick="WdatePicker();" name="stime" value="{$stime}" /> 至 <input class="form-control" type="text" onclick="WdatePicker();" name="etime" value="{$etime}" />
      
        
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="输入订单号搜索" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
      
      <div style="clear:both;"></div>
      </div>
     <div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td align="center">ID</td>
    
    <td align="center">收货信息</td>
    
    <td align="center">总价</td>
    <td align="center">配送方式</td>
    
    
    <td align="center">状态</td>
    
    <td align="center">用户留言</td>
    
    
    <td align="center">支付方式</td>
    
    
    <td align="center">下单时间</td>
    <td align="center">操作</td>
  </tr>
</thead>
<volist name="list" id="vo">
  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />{$vo.id}</td>
    
    <td>
    订单号：{$vo.ordernumber}    &nbsp;    <?php if($vo['aff_id']){ echo '推荐人id:'.$vo['aff_id'];} ?><br>

    <notempty name="vo['yourname']">收货人：{$vo.yourname}</notempty>　会员ID:{$vo.member_id}　<notempty name="vo['nickname']">{$vo.nickname}</notempty><notempty name="vo['tel']">
    <br>
电话：{$vo.tel}
</notempty>
<notempty name="vo['address']">
<br>
地址：{$vo.address}
</notempty>
<notempty name="vo['taxtitle']">
<br>
发票抬头:<span style="color:#f00;">{$vo['taxtitle']}</span>
</notempty>
</td>

    <td><span style="color:#f00; font-weight:bold; font-size:14px;">¥<span class="ajaxText" tablename="Order" field="total" id="{$vo.id}" val="{$vo.total}" >{$vo.total}</span></span>
    
     <gt name="vo['integral_pay']" value="0">
        <p>使用{$vo.integral_pay}  积分抵扣</p>
    </gt>
    <gt name="vo['coupon_sn_id']" value="0">
        <p>使用优惠券：{$vo.coupon_sn_id}(<span style="color:#f00;">¥{$vo['coupon_total']}</span>)</p>
    </gt>
    
    </td>
    <td align="center">{:getShippingName($vo['shipping_id'])}(<span style="color:#f00; font-weight:bold; font-size:14px;">¥{$vo.shipping_fee}</span>)</td>
    <td align="center">
    
     <eq name="vo['status']" value="0">已取消</eq>
    <eq name="vo['status']" value="1">待支付</eq>
    <eq name="vo['status']" value="2">已支付</eq>
    <eq name="vo['shipping_status']" value="0">未发货</eq>
    <eq name="vo['shipping_status']" value="1">部分发货</eq>
    <eq name="vo['shipping_status']" value="2">全部发货</eq>
    <eq name="vo['shipping_status']" value="3">部分确认</eq>
    <eq name="vo['shipping_status']" value="4"><span style="color:#26CB62; font-weight:bold;">全部确认</span></eq>
    <eq name="vo['service_status']" value="1">退货</eq>
    <eq name="vo['service_status']" value="2">换货</eq>
    <eq name="vo['service_status']" value="3">部分退货中</eq>
    <eq name="vo['service_status']" value="4">全部退货中</eq>
    <eq name="vo['service_status']" value="5">部分已退货</eq>
    <eq name="vo['service_status']" value="6">全部已退货</eq>
    </td>
    <td align="center">
    {$vo.Guestbook}

   
    
    </td><td align="center">
    

    {$vo.paytypename}
    
    
    </td>
    <td align="center">{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
    <td align="right">
<!--<neq name="vo['service_status']" value="4">-->
    <!--<neq name="vo['confirm']" value="1">-->
      <!--<eq name="vo['status']" value='2'>-->
        <!--<a href="{:U('Order/confirm',array('id'=>$vo['id']))}" class="btn btn-primary btn-sm" >确认</a>-->
      <!--</eq>-->
    <!--</neq>-->
    <!--　</neq>-->
<neq name="myrole" value="1">
    <eq name="vo['status']" value="1"> 
     <a href="" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal"  style="font-size:12px;" onClick=" document.getElementById('order_id').value={$vo.id}" >付款</a> 　
     </eq>
</neq>
     <a href="{:U('Order/edit',array('id'=>$vo['id']))}" class="btn btn-primary btn-sm" >查看</a>　<a href="{:U('Order/delete',array('id'=>$vo['id']))}" class="btn btn-danger btn-sm"  onclick="return confirm('您确定要删除这条记录吗？');">删除</a>
    
    <!-- 退款审核确认 -->
      <if condition="$vo.status eq 6">
        <a href="{:U('refund',array('id'=>$vo['id']))}" class="btn btn-primary btn-sm" >退款审核</a>
      </if>
    <!-- end -->
    </td>
  </tr>
</volist>
</table>
 
      <div class="pages">
        <div class="controlList fl">
        
         
        <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a>
        
        </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
      
      
      
      
    </div>
  </div>
  <div class="clear"></div> 
  
  <!-- 物流弹出框 -->
  
  <!-- Modal -->
<form action="{:U('payment')}" method="post">
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">付款操作</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2"></label>
            <br>
            <input type="hidden" value="" id="order_id" name="order_id">
            <input type="text" class="form-control" id="exampleInputName2" name="remark" placeholder="请填写操作理由">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div>
    </div>
</form>  
</div>
<include file="Public:footer" />